﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCCamNan.ascx.cs" Inherits="UControls_UCCamNanAmThuc" %>
<div>
    <asp:Label ID="Label1" runat="server" CssClass="KhoiXanhLa" Height="24px" 
        Text="Cẩm nang mua sắm" Width="100%"></asp:Label>
</div>
<asp:DataList ID="DataList1" runat="server" DataSourceID="EntityDataSource1" 
    Width="100%">
    <ItemTemplate>
        <asp:Image ID="Image1" runat="server" ImageAlign="Left" 
            ImageUrl='<%# "~/Photos/BaiViet/"+ Eval("HinhDaiDien") %>' Width="180px" />
        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="LinkBaiViet" 
            NavigateUrl='<%# "~/Pages/BaiViet.aspx?IDBaiViet="+Eval("BaiVietID") %>' 
            Text='<%# Eval("TuaBaiViet") %>'></asp:HyperLink>
        <asp:Label ID="Label3" runat="server" 
            Text='<%# Eval("NgayCapNhat", "{0:dd/MM/yyyy}") %>'></asp:Label>
        <asp:Label ID="Label4" runat="server" 
            Text='<%# Thuvien.CatTu(Eval("NoiDung").ToString(), 100) %>'></asp:Label>
    </ItemTemplate>
</asp:DataList>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
    ConnectionString="name=EDiamondEntities1" 
    DefaultContainerName="EDiamondEntities1" EnableFlattening="False" 
    EntitySetName="BaiViets" OrderBy="it.NgayCapNhat DESC , it.BaiVietID DESC skip 0 limit 3
" 
    
    Select="it.[TuaBaiViet], it.[NoiDung], it.[HinhDaiDien], it.[NgayCapNhat], it.[BaiVietID], it.TheLoai" 
    EntityTypeFilter="" Where="it.TheLoai = 3">
</asp:EntityDataSource>

